package cn.iocoder.mall.product.service.rpc.service.impl;

import cn.iocoder.common.utils.common.util.ObjectUtils;
import cn.iocoder.mall.product.api.CommoditySpuService;
import cn.iocoder.mall.product.api.dto.ProductMsgDTO;
import cn.iocoder.mall.product.service.ICommoditySpuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/***
 *@author ssf
 *@date 2019-11-25 21:34
 */
@Service
@org.apache.dubbo.config.annotation.Service(validation = "true", version = "${dubbo.provider.CommoditySpuService.version}")
public class RpcCommoditySpuServiceImpl implements CommoditySpuService {

    @Autowired
    ICommoditySpuService spuService;

    @Override
    public List<ProductMsgDTO> getGoodsList(List<Long> spuIds) {
        return ObjectUtils.copyList(spuService.getGoodsList(spuIds),ProductMsgDTO.class);
    }
}
